<template>
	<view>
		<view class="plr15">
			<view class="plt15 border-bottom" v-for="(item,index) in list" :key="index">
				<view class="flex alcenter item-content">
					<image :src="item.image" mode="widthFix" class="img"></image>
					<view class="ml10 fl1">
						<view class="cl-w ft18">{{item.uname}}</view>
						<view class="cl-w8 mt20 ft14 text-over2" v-if="item.type==0">{{$t('text.yanyuan')}}</view>
						<view class="cl-w8 mt20 ft14 text-over2" v-else>{{$t('text.yanyuan5')}}</view>
						<!-- <view class="flex mt10">
							<view class="label mr10" v-for="it in item.yy">{{it}}</view>
						</view> -->
					</view>
				</view>
				<view class="mt14 flex ft12" style="justify-content: end;">
					<view class="flex alcenter">
					</view>
					<view class="flex alcenter col20" @click="goChapter(item.id)">
						<u-icon name="file-text" color="#fff" size="18"></u-icon>
						<view class="cl-w8 ml2">{{$t('text.bianji')}}</view>
					</view>
					<!-- <view class="flex alcenter col20"  @click="upload(item.id)">
						<u-icon name="list-dot" color="#fff" size="18"></u-icon>
						<view class="cl-w8 ml2">章节</view>
					</view> -->
				<!-- 	<view class="flex alcenter col20"  @click="xiajia(item.id)">
						<u-icon name="trash" color="#fff" size="18"></u-icon>
						<view class="cl-w8 ml2">{{$t('text.shanchu1')}}</view>
					</view> -->
					
				</view>
			</view>
		</view>
		<view style="height: 150rpx;"></view>
		<view class="release">
			<view class="btn" @click="$u.route('/pages/creator/user/yanyuan_add')">添加演员</view>
		</view>
	</view>

</template>

<script>
	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
	export default {
		components: {
			uniLoadMore,
		},
		data() {
			return {
				list:[],
				pid:''
			}
		},
		onLoad(e) {
			//console.log(111)
			this.pid = e.id
			this.init();
		},
		onShow() {
			this.init()
		},
		methods: {
			ggjiesuo(id){
				this.$httpas.post2({
					data: {
						do: 'creator',
						op: 'ggjiesuo',
						id:id
					},
					success: res => {
						this.init()
					}
				})
			},
			 init(){
				this.$httpas.post2({
					data: {
						do: 'creator',
						op: 'juse',
						index:0
					},
					success: res => {
						this.list = res
						}
				})
			},
			async xiajia(id){
				let params = {
					id: id,
					status:'hidden',//normal是上架
				}
				let [err, res] = await this.$httpas.get('/api/creator/zhangjie_xiaja', params,{token:true});
				this.list = res.data.data
			},
			upload(id){
				uni.navigateTo({
					url:'/pages/creator/user/releaseVideo/chapter?id='+id
				})
			},
			goChapter(id){
				uni.navigateTo({
					url: 'yanyuan_add?id=' + id
				})
			}
			
		}
	}
</script>

<style lang="scss">
	.item-content {
		width: 100%;

		.img {
			width: 170rpx;
			height: 228rpx;
			border-radius: 20rpx;
		}

		.label {
			background: #292A2E;
			color: rgba(255, 255, 255, 0.8);
			font-size: 24rpx;
			padding: 6rpx 10rpx;
			border-radius: 8rpx;
		}
	}

	.border-bottom {
		border-bottom: 1px solid #28292D;
	}

	.release {
		position: fixed;
		bottom: 0;
		right: 0;
		left: 0;
		background: #000;
		padding: 30rpx;

		.btn {
			background: rgba(11, 144, 249, 1);
			text-align: center;
			border-radius: 50rpx;
			padding: 20rpx 0;
			color: #fff;
		}
	}
	.col40{
		width: 60%;
	}
	.col20{
		width: 20%;
	}
</style>